package club.caihappy.mapper;

import club.caihappy.pojo.User;
import org.apache.ibatis.session.SqlSession;
import org.mybatis.spring.SqlSessionTemplate;
import org.mybatis.spring.support.SqlSessionDaoSupport;

import java.util.List;

/**
 * Created by 百岁 on 2021/7/17
 **/
public class UserMapperImpl extends SqlSessionDaoSupport implements UserMapper {
    public List<User> getUser() {
        return getSqlSession().getMapper(UserMapper.class).getUser();
    }

//    private SqlSessionTemplate sqlSession;
//
//    public void setSqlSession(SqlSessionTemplate sqlSession) {
//        this.sqlSession = sqlSession;
//    }
//
//    public List<User> getUser() {
//        UserMapper mapper = sqlSession.getMapper(UserMapper.class);
//        return mapper.getUser();
//    }
}
